import logging
import yagmail
def log_set():
    # 日志等级，内容，日志名称
    logging.basicConfig(level=logging.DEBUG,format='%(name)s-%(pathname)s-%(lineno)d',filename='log.txt')
def send_email(a):
    # 用户邮箱，授权码，接收人，标题
    mail=yagmail.SMTP(user='2291385879@qq.com',password='vdsuyyqeqkbtdjhf',host='smtp.qq.com')
    mail.send(to='2291385879@qq.com',subject='测试用例',contents='具体内容文件',attachments=a)